An electronic device with a USB interface in the conventional art, such as a handheld terminal with a USB interface, adopts one cable to implement both USB communication and charging, namely, the cable can be used for both charging and USB communication. Thereby, the Charge Voltage (VCHG) at the anode of the charging interface of a mobile phone and the USB_VBUS are directly or indirectly short circuited.
The USB interface circuit of a handheld terminal device is provided with two pins, wherein one pin is a Charge Voltage (VCHG) of a power management chip and is configured to detect the plugging/unplugging status of a charger, when the voltage of a VCHG terminal is more than a threshold (such as 3.3V), it is determined that the charger is plugged, and when the voltage of the VCHG terminal is less than or equal to a threshold (such as 3.3V), it is determined that the charger is unplugged; and the other pin is the power anode of the USB (USB_VBUS) of a USB interface chip, when the voltage of the USB_VBUS terminal is more than the Session value (such as 2.0V) in the USB specification, it is determined that the USB communication cable is plugged to start a USB status machine, and when the voltage of the USB_VBUS terminal is less than or equal to the Session value (such as 2.0V) in the USB specification, it is determined that the USB communication cable is unplugged.
The starting condition of the charging status machine of the handheld terminal with the USB interface is detecting whether the voltage of the anode of the charging interface is more than a certain threshold (such as 3.3V), when the applied voltage is more than the threshold, it is determined that the charger is plugged and the charging management is started; otherwise, the charger is unplugged and the charging is stopped. Meanwhile, the working voltage of the VCHG is in a high range, generally from more than ten volts to twenty volts (such as 18V); and the working voltage of the USB_VBUS terminal is in a low range, generally 5.25V.
All in all, the starting condition of the USB status machine of the handheld terminal is: detecting whether the voltage of the USB_VBUS terminal (the power anode of the USB) is more than the Session value (such as 2.0V) in the USB specification; and if the applied voltage is more than the Session value, the USB enumeration process is started, otherwise, the USB status machine is stopped. The maximum working voltage of the USB_VBUS is generally 5.25V, which is relatively low. Based on this, the starting conditions of a USB status machine and a charging status machine are different, and a circuit is required to distinguish different signals to start USB communication. The present solution for starting USB when a charger shares one interface with USB communication in the industry is generally as shown in FIG. 1: the VCHG is subjected to voltage reduction by a Zener diode D1 and then connected to the USB_VBUS. The method is simple in circuit but has the following defect the Zener diode is slow in response, so that protection cannot be provided for the overshoot caused by the instant plugging of the charger.
Thus, a mobile phone terminal device can be damaged easily when a charger shares one interface with USB communication in the conventional art.